-- GENERATED SPELL FOR [Defias Trapper] --


function spell0_504(pUnit, Event) --@Backstab,n/a--
pUnit:FullCastSpellOnTarget(2589,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_504', 595, 1)
end

function spell1_504(pUnit, Event) --@Net,n/a--
pUnit:FullCastSpellOnTarget(12024,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_504', 5342, 1)
end

function Sorts_504(pUnit, Event)
local choix_sorts_504 = math.random(0, 1)
if choix_sorts_504 == 0 then
pUnit:RegisterEvent('spell0_504', 1, 1)
end
if choix_sorts_504 == 1 then
pUnit:RegisterEvent('spell1_504', 1, 1)
end
end

function mob504_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_504', math.random(1500, 3000), 1)
end

function mob504_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob504_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob504_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(504, 1, 'mob504_Action')
RegisterUnitEvent(504, 2, 'mob504_Leave')
RegisterUnitEvent(504, 3, 'mob504_Kill')
RegisterUnitEvent(504, 4, 'mob504_Die')
